Upload Files
Certainly! Here is the help documentation for the "Upload Files" activity:
# Upload Files
```AutomatR.FTP.UploadFiles```
The "Upload Files" activity in AutomatR is part of the FTP activities package, providing functionality to upload files to an FTP server. This activity streamlines the process of transferring files from a local system to a specified path on the FTP server, enhancing the efficiency of automation workflows.
## Properties
| Name | Description |
| -------------------- | -------- |
| ***Input*** | |
| User Name | Provides a valid username to establish a connection with the FTP server. String variables containing the username. |
| Password | Provides the password for the username to establish a connection with the FTP server. String variables containing the password. |
| Host | Provides a valid host credential to establish a connection with the FTP server. String variables containing the host information. |
| Source Files | Provides a List<String> variable that contains the paths of the files you want to upload from your local system. For example, use `new List<string> { "D:\\UploadFile/uploadfile.docx" }`. |
| Server Path | Provides the server path where you would like to upload the files. For example, "/UploadFile". String variables containing the server path. |
| Overwrite | If checked, it enables you to upload files with the same name as the one in the destination location. Boolean variables indicating whether to overwrite existing files. |
| ***Miscellaneous*** | |
| Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
| ***Optional*** | |
| Delay | Specifies the amount of time (in seconds) to wait before executing the "Upload Files" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. For example, if the delay is 1000 milliseconds or 1 sec, set it to 1. |
**How to use:**
1. Drag and drop the "Upload Files" activity onto the workflow.
2. Configure the properties by specifying the FTP server credentials, local source files, server path, and optional delay.
3. Set the Overwrite property to decide whether to overwrite existing files with the same name in the destination location.
4. Execute the workflow to upload the specified files from the local system to the FTP server.
**Example:**
Consider an example where the "Upload Files" activity is used to upload files "uploadfile.docx" and "image.jpg" from the local system to the "/UploadFile" directory on the FTP server:
```plaintext
Upload Files:
Delay: 0
Password: "your_password"
User Name: "your_username"
Host: "ftp.yourftpserver.com"
Source Files: new List<string> { "D:\\UploadFile/uploadfile.docx", "D:\\UploadFile/image.jpg" }
Server Path: "/UploadFile"
Overwrite: true
In this example, the activity uploads files from the specified local paths to the "/UploadFile" directory on the FTP server. The Overwrite property is set to true, allowing files with the same name in the destination location to be overwritten.